package com.sjc.yarn

// 注册消息   nodemanager  -> resourcemanager
case class RegisterNodeManager(val nodemanagerid: String, val memory: Int, val cpu: Int)

// 注册完成消息 resourcemanager -> nodemanager
case class RegisteredNodeManager(val resourcemanagerhostname: String)

// 心跳消息  nodemanager -> resourcemanager
case class Heartbeat(val nodemanagerid: String)

// NodeManager 信息类
class NodeManagerInfo(val nodemanagerid: String, val memory: Int, val cpu: Int) {

  // 上一次心跳时间
  var lastHeartBeatTime: Long = _

  override def toString: String = {
    nodemanagerid + "," + memory + "," + cpu
  }
}

// 一个发送心跳的信号
case object SendMessage

// 一个检查信号
case object CheckTimeOut
